//
//  ZREmoticonModel.swift
//  Sina
//
//  Created by 张锐 on 16/3/8.
//  Copyright © 2016年 zhangr. All rights reserved.
//

import UIKit

class ZREmoticonModel: NSObject {
    
 /// [笑哈哈]
    var chs :String?
 /// 笑哈哈的图片
    var png :String?
//    emoji的code
    var code :String?{
    
        didSet{
        
            let scan = NSScanner(string: code!)
            
            var result :UInt32 = 0
            
            scan.scanHexInt(&result)
            
            let unicode = UnicodeScalar(result)
            
            let character = Character(unicode)
            
            emoji = "\(character)"       
        
        }
    
    
    }
    /// 包绝对路径名称
    var packagePath : String?
    //emoji表情
    var emoji:String?
//重写构造方法
    init(dict : [String : NSObject] ) {
        
        super.init()

        setValuesForKeysWithDictionary(dict)
    }
    
    override func setValue(value: AnyObject?, forUndefinedKey key: String) {
        
    }

}
